package com.gwtjs.struts;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;

@ParentPackage("json-default")
@Namespace(value = "/test")
public class ConventionTestAction extends ActionSupport {

	private static final long serialVersionUID = 7250554290060921960L;
	private String resultStr;

	@Override @Action(value="strutsConventionTest",
			results={@Result(name="success",type="json")})
	public String execute() throws Exception {
		resultStr = "Struts2 Convention  test Success ";
		return SUCCESS;
	}

	public String getResultStr() {
		return resultStr;
	}

}
